package com.hcinfos.gsoo.ui;

import com.hcinfos.gsoo.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

/**
 * 多个注册方式入口
 * 
 * @author xi
 * 
 */
public class MutilRegActivity extends Activity implements OnClickListener {

	private TextView reg_tv;
	private ImageButton left_ib;
	private TextView center_tv;
	private Button gsooBtn;
	private Button emailBtn;

	private Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_mutilreg);
		initRes();
	}

	private void initRes() {

		center_tv = (TextView) findViewById(R.id.center_tv);
		center_tv.setText("用户注册");

		left_ib = (ImageButton) findViewById(R.id.left_ib);
		left_ib.setBackgroundResource(R.drawable.wb_btn_off);
		left_ib.setOnClickListener(this);
		reg_tv = (TextView) findViewById(R.id.reg_tv);
		reg_tv.setVisibility(View.GONE);

		gsooBtn = (Button) findViewById(R.id.gsoo_button);
		gsooBtn.setOnClickListener(this);
		emailBtn = (Button) findViewById(R.id.email_button);
		emailBtn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.left_ib:
			Intent intent = new Intent(this,LoginActivity.class);
			startActivity(intent);
			finish();
			break;
		case R.id.gsoo_button:
			intent = new Intent(this, GsooAccountRegActivity.class);
			startActivity(intent);
			break;
		case R.id.email_button:
			intent = new Intent(this, RegActivity.class);
			startActivity(intent);
			break;
		}

	}

}
